package cn.fjsay.java.demo3;

public class Test {
    public static void main(String[] args) {
        Instrument[] instruments = new Instrument[3];
        instruments[0] = new Wind();
        instruments[1] = new Percussion();
        instruments[2] = new Stringed();

        for (Instrument instrument : instruments) {
            instrument.play();
        }
    }
}